import cv2
def save_position(value,bool):
    if bool == True:#读取
        print('read')
        return value
    elif bool == False:
        position = value
        print(position)
        print("Save")
def draw_show(image,position):
    image = cv2.circle(image,position,10,(0,255,255),4)
    return image
class Count_Position:
    def get_center_point(top_left_x,top_left_y,lower_right_x,lower_right_y):
        #print(top_left_x,top_left_y,lower_right_x,lower_right_y)
        center_point_x = (lower_right_x-top_left_x)/2
        center_point_y = (top_left_y-lower_right_y)/2
        center_position = (center_point_x,center_point_y)
        return center_position

